//
//  WXSecondViewController.m
//  PodsLibDemo
//
//  Created by wxiang on 2020/9/22.
//  Copyright © 2020 wangxiang. All rights reserved.
//

#import "WXSecondViewController.h"
#import "WXLPodsLibResource.h"
#import "WXFirstViewController.h"

@interface WXSecondViewController ()

@end

@implementation WXSecondViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor lightGrayColor];
    self.title = @"Second vc";
    
    NSLog(@"进入 WXSecondViewController");
    
//    UIImage *image = [UIImage imageNamed:@"LuLian2"];
    UIImage *image = [WXLPodsLibResource imageNamed:@"LuLian2"];
    NSLog(@"WXSecondViewController image  = %@",image);
    
    UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
    imageView.frame = CGRectMake(200, 200, 100, 100);
    [self.view addSubview:imageView];
    
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    [btn setTitle:@"跳转到FirstVC页面" forState:UIControlStateNormal];
    [btn setTitleColor:UIColor.blackColor forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(gotoFirstVCButtonClicked) forControlEvents:UIControlEventTouchUpInside];
    btn.frame = CGRectMake(100, 100, 200, 40);
    [self.view addSubview:btn];
}

- (void)gotoFirstVCButtonClicked{
    WXFirstViewController *vc = [[WXFirstViewController alloc] initWithNibName:NSStringFromClass([WXFirstViewController class]) bundle:[WXLPodsLibResource SDKBundle]];
    
    [self.navigationController pushViewController:vc animated:YES];
}
@end
